help::
	@echo "Available commands"
	@echo "  help           -- (default) print this message"

tests: mypy pytest
help::
	@echo "  tests          -- run all tests for realtime package"

mypy:
	uv run --package realtime mypy src/realtime tests
help::
	@echo "  pytest         -- run mypy on realtime package"

pytest: start-infra
	uv run --package realtime pytest --cov=realtime --cov-report=xml --cov-report=html -vv
help::
	@echo "  pytest         -- run pytest on realtime package"

start-infra:
	supabase start --workdir infra -x studio,mailpit,edge-runtime,logflare,vector,supavisor,imgproxy,storage-api
help::
	@echo "  stop-infra     -- start containers for tests"

stop-infra:
	supabase --workdir infra stop
help::
	@echo "  stop-infra     -- stop containers for tests"

clean:
	rm -rf htmlcov .pytest_cache .mypy_cache .ruff_cache
	rm -f .coverage coverage.xml
help::
	@echo "  clean          -- clean intermediary files generated by tests"

build:
	uv build --package realtime
help::
	@echo "  build          -- invoke uv build on realtime package"
